package kr.co.doriclassic.summary_java.dto;

public class Department implements Comparable<Department>{
	private int deptNo;
	private String deptName;
	private int floor;
	
	public Department() {
	}

	public Department(int deptNo, String deptName, int floor) {
		this.deptNo = deptNo;
		this.deptName = deptName;
		this.floor = floor;
	}


	public int getDeptNo() {
		return deptNo;
	}
	public void setDeptNo(int deptNo) {
		this.deptNo = deptNo;
	}
	public String getDeptName() {
		return deptName;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	public int getFloor() {
		return floor;
	}
	public void setFloor(int floor) {
		this.floor = floor;
	}
	@Override
	public String toString() {
		return String.format("%s, %s, %s",
				deptNo, deptName, floor);
	}

	public String[] toArray(){
		return new String[]{String.valueOf(deptNo), deptName, String.valueOf(floor)};
	}
	
	@Override
	public int compareTo(Department o) {
		return deptNo-o.deptNo;
	}	
}
